﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;

namespace Model
{
    public class Ellipse : Rectangle
    {
        public Ellipse(Point firstPoint) : base(firstPoint){}

        public override void Draw(Graphics g)
        {
            var pen = new Pen(this.Color, this.BorderWidth);
            var drawrect = new System.Drawing.Rectangle(UpperLeftCorner(), new Size(Width, Height));
            g.DrawEllipse(pen, drawrect);
            if (Fill)
            {
                g.FillEllipse(new SolidBrush(this.FillColor),
                              new System.Drawing.Rectangle(FillUpperrLeftCorner(), FillSize()));
            }
        }
    }
}